<% Response.Expires = 0 ' create instance of AspJpeg Set Jpeg = Server.CreateObject("Persits.Jpeg") ' Open source file Jpeg.Open( Request("path") ) ' Check for whitespace setting If Request("whitespace") = "true" Then If Jpeg.Width > Jpeg.Height Then Jpeg.Width = Request("Width") Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth varCentreHeight = (Request("Height") - Jpeg.Height) / 2 Jpeg.Crop 0, -varCentreHeight, Request("Width"), Jpeg.Height + varCentreHeight Else Jpeg.Height = Request("Height") Jpeg.Width = Jpeg.OriginalWidth * Jpeg.Height / Jpeg.OriginalHeight varCentreWidth = (Request("Width") - Jpeg.Width) / 2 Jpeg.Crop -varCentreWidth, 0, Jpeg.Width + varCentreWidth, Request("Height") End If Else ' Set new height and width If Request("Width") = "" Then Jpeg.Height = Request("Height") Jpeg.Width = Jpeg.OriginalWidth * Jpeg.Height / Jpeg.OriginalHeight Else Jpeg.Width = Request("Width") End If If Request("Height") = "" Then Jpeg.Width = Request("Width") Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth Else Jpeg.Height = Request("Height") End If End If ' Perform resizing and ' send resultant image to client browser Jpeg.SendBinary %>